package com.zunipe.chat.util;

import java.text.SimpleDateFormat;
import java.util.Locale;

public class TimeUtils {
    public static String getTime() {
        long currentTimeMillis = System.currentTimeMillis();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
        return sdf.format(currentTimeMillis);
    }

    public static String getTime(long timeStamp) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA);
        return sdf.format(timeStamp);
    }
}
